﻿using System.Web.Mvc;
using Omu.AwesomeDemo.Core.Model;
using Omu.AwesomeDemo.Core.Repository;

namespace Omu.AwesomeDemo.WebUI.Controllers
{
    public class PagerDemoController : BaseController
    {
        private readonly IRepo<Person> repo;

        public PagerDemoController(IRepo<Person> repo)
        {
            this.repo = repo;
        }

        public ActionResult Index(int? page)
        {
            return View(repo.GetPageable(page ?? 1, 1));
        }
    }
}